import api from '../../api';
import { message } from 'antd';
export default {
  namespace: 'convertibleBondListM',
  state: {},

  effects: {
    //获取列表
    *getTableData({ payload, callback }, { call, put, select }) {
      const res = yield call(api.convertibleBondList.getTableList, payload);
      if (res) {
        if (res.code == 0) {
          callback(res.data);
        } else {
          callback();
          message.error(res.msg || '可转债赎回列表查询失败!');
        }
      } else {
        callback();
        message.error('可转债赎回列表查询失败!');
      }
    },
  },
  reducers: {
    setState(state, { payload }) {
      return {
        ...state,
        ...payload,
      };
    },
  },
};
